# -*- coding: utf-8 -*-
"""
-------------------------------------------------
   File Name：     argsmodule
   Description :
   Author :       zm.z
   date：          2020/2/3
-------------------------------------------------
   Change Activity:
                   2020/2/3:
-------------------------------------------------
"""
__author__ = 'zm.z'

import argparse


def get_args(addargs_dict):
    """
    命令行启动时获取命令行参数
    :param addargs_dict: dict,
    :return: dict,
    """
    parser = argparse.ArgumentParser()
    for ehkey in addargs_dict.keys():
        parser.add_argument(ehkey, **addargs_dict[ehkey])
    args = parser.parse_args()
    return args
